package com.rec.service.impl;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.rec.repository.UsersRepository;
import com.rec.service.UsersService;
@Service
@Transactional
public class UsersServiceImpl implements UsersService {
	@Autowired
	private UsersRepository r;
	@Override
	public Integer getIndex(String username, String password) {
		Integer i = 0;
		if(r.getUserByUsernameAndPassword(username,password)!=null) {
			i=1;
		}
		return i;
	}

}
